#!/bin/sh

dirlist='. breln bw opts orel rcpt stat wfrom wreln wsubn'

for dir in $dirlist ; do
  for fname in $(find "$dir" -maxdepth 1 -name '*.js' -and ! -name '*-min.js') ; do
    fbase="`expr "$fname" : '\(.*\)\.js'`"
    fminname="${fbase}-min.js"
    echo "$fname"' -> '"$fminname"
    java -jar yuicompressor.jar "$fname" -o "$fminname" --charset utf-8 --line-break 2048
  done
done
